package com.xmtlxx.wms.service;

import com.xmtlxx.common.core.domain.PageQuery;
import com.xmtlxx.common.core.domain.entity.SysDictData;
import com.xmtlxx.common.core.page.TableDataInfo;
import com.xmtlxx.oms.domain.vo.AreaBiVo;
import com.xmtlxx.oms.domain.vo.CurrentBiVo;
import com.xmtlxx.oms.domain.vo.RegionBiVo;
import com.xmtlxx.oms.domain.vo.StoreBiVo;
import com.xmtlxx.wms.domain.ProBase;
import com.xmtlxx.wms.domain.bo.InventoryBo;
import com.xmtlxx.wms.domain.bo.SelectInventoryPropertyBo;
import com.xmtlxx.wms.domain.vo.DataVo;
import com.xmtlxx.wms.domain.vo.InventoryVo;

import java.util.Collection;
import java.util.List;

/**
 * 库存Service接口
 *
 * @author xmtlxx
 * @date 2022-08-15
 */
public interface IInventoryService {

    /**
     * 查询库存
     *
     * @param id 库存主键
     * @return 库存
     */
    InventoryVo queryById(String id);

    InventoryVo queryByPno(String pno,String storeId,String status);

    InventoryVo selectByPno(String pno);

    /**
     * 查询库存列表
     *
     * @param bo 库存
     * @return 库存集合
     */
    TableDataInfo<InventoryVo> queryPageList(InventoryBo bo, PageQuery pageQuery);

    /**
     * 查询库存列表
     *
     * @param bo 库存
     * @return 库存集合
     */
    List<InventoryVo> queryList(InventoryBo bo);

    TableDataInfo<InventoryVo> queryPageAppList(InventoryBo bo, PageQuery pageQuery);

    List<InventoryVo> queryListWithOutPic(InventoryBo bo);

    List<InventoryVo> selectInventoryProList(InventoryBo bo);

    /**
     * 修改库存
     *
     * @param bo 库存
     * @return 结果
     */
    Boolean insertByBo(InventoryBo bo);

    Boolean insertByStagingBo(InventoryBo bo);

    /**
     * 修改库存
     *
     * @param bo 库存
     * @return 结果
     */
    Boolean updateByBo(InventoryBo bo);

    /**
     * 校验并批量删除库存信息
     *
     * @param ids 需要删除的库存主键集合
     * @param isValid 是否校验,true-删除前校验,false-不校验
     * @return 结果
     */
    Boolean deleteWithValidByIds(Collection<String> ids, Boolean isValid);

    /**
     * 添加库存
     *
     * @param bo 库存
     * @return 结果
     */
    Boolean addInventory(InventoryBo bo);


    List<DataVo> selectInventoryByList();

    List<DataVo> selectPropertyByList();

    List<InventoryVo> queryInventoryByList();

    List<StoreBiVo> selectCountByStore(InventoryBo inventory,List<SysDictData> dictDataList);

    List<StoreBiVo> selectCountByStoreApp(InventoryBo inventory);

    List<AreaBiVo> selectCountByArea(InventoryBo inventory);

    List<RegionBiVo> selectCountByRegion(InventoryBo inventory);

    List<RegionBiVo> selectCountByRegionApp(InventoryBo inventory);

    CurrentBiVo countCurrentTotals(InventoryBo inventory);

    CurrentBiVo countPickupTotals(InventoryBo inventory);

    CurrentBiVo countPoliceTotals();

    List<RegionBiVo> countPoliceDatas();

    List<CurrentBiVo> countRegionTotals();

    List<CurrentBiVo> countPoliceDeptTotals();

    CurrentBiVo countCurrentOutTotals(InventoryBo inventory);

    CurrentBiVo countDatasTotals(InventoryBo inventory);

    CurrentBiVo countDatasCurrentTotals(InventoryBo inventory);

    List<RegionBiVo> selectCountByCarType(InventoryBo inventory);

    List<InventoryVo> reCheckInventoryDatas();

    TableDataInfo<SelectInventoryPropertyBo> selectInventoryPropertyList(PageQuery pageQuery, SelectInventoryPropertyBo bo);

    boolean tempStorage(List<String> ids);

    boolean cancelTempStorage(List<String> ids);

    List<ProBase> getProBaseList();

    int insertProBase(List<ProBase> proBases);

}
